Fix reporting Hot Reload capabilities of WASM projects#53665
Open
tmat wants to merge 2 commits intodotnet:release/10.0.3xxfrom
Open
Fix reporting Hot Reload capabilities of WASM projects#53665tmat wants to merge 2 commits intodotnet:release/10.0.3xxfrom
tmat wants to merge 2 commits intodotnet:release/10.0.3xxfrom
Conversation
tmat
commented
Apr 1, 2026
| if (projectHotReloadCapabilities.IsEmpty) | ||
| { | ||
| logger.LogDebug("Project specifies capabilities: {Capabilities}.", capabilitiesStr); | ||
| // Note that this is not possible with SDK 10+ since the WASM SDK always defines the capabilities in the project, |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates dotnet watch / Hot Reload logging and associated tests to correctly report WebAssembly (Blazor WASM) Hot Reload capabilities, including distinguishing between capabilities coming from the project vs. inferred defaults.
Changes:
- Add a dedicated log event/message for “Project specifies capabilities” and update WASM hot reload client logging accordingly.
- Update tests to cover capability reporting across target frameworks/package versions and align with updated browser-refresh logging messages.
- Extend
TestAsset.WithSourceto support overriding target framework and package version property substitutions for test scenarios.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/TestAssets/TestProjects/WatchBlazorWasm/blazorwasm.csproj | Removes an older SelfContained workaround from the WASM test asset. |
| test/Microsoft.NET.TestFramework/TestAsset.cs | Enhances WithSource to allow overriding TFM and package version substitutions. |
| test/dotnet-watch.Tests/HotReload/RazorHotReloadTests.cs | Updates WASM Hot Reload tests to validate capability reporting and updated messages. |
| test/dotnet-watch.Tests/Browser/BrowserTests.cs | Updates expectations for the renamed browser-refresh middleware message descriptor. |
| src/Dotnet.Watch/Watch/UI/IReporter.cs | Adds new message descriptor and renames browser-refresh message descriptor. |
| src/Dotnet.Watch/Watch/AppModels/WebApplicationAppModel.cs | Updates logging to use the renamed browser-refresh middleware descriptor. |
| src/Dotnet.Watch/HotReloadClient/Web/WebAssemblyHotReloadClient.cs | Adjusts WASM capability logging and introduces a new log event usage. |
| src/Dotnet.Watch/HotReloadClient/Logging/LoggingUtilities.cs | Fixes a typo in the tuple element name returned from ParseCategoryName. |
| src/Dotnet.Watch/HotReloadClient/Logging/LogEvents.cs | Adds new log events for WASM capability-source reporting. |
src/Dotnet.Watch/HotReloadClient/Web/WebAssemblyHotReloadClient.cs
Outdated
Show resolved
Hide resolved
Member
Author
|
@DustinCampbell ptal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.